package com.flute.framework.search.strategy;

import com.flute.framework.search.SearchKeyword;
import com.flute.framework.search.strategy.ISearchStrategy;
import com.flute.tools.util.StringUtil;

public abstract class AbstractSearchStrategy implements ISearchStrategy {
	protected String fieldName;
	private String keywordField;

	public String getKeywordField() {
		if(StringUtil.isNullOrEmpty(keywordField)){
			return SearchKeyword.KEYWORD;
		}
		return keywordField;
	}

	public void setKeywordField(String keywordField) {
		this.keywordField = keywordField;
	}

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

	public String standardize(String string) {
		string = StringUtil.getStandardString(string);
		string = StringUtil.chineseFJChange(string);

		return string;
	}
}
